//
//  MyPartRepairCell.m
//  Ghac 4S
//
//  Created by apple apple on 12-1-6.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "MyPartRepairCell.h"
#import "NeedRepairParts.h"
@implementation MyPartRepairCell
@synthesize dataFieldList;
@synthesize handleBtn;
@synthesize partsData;
-(id)initWithCoder:(NSCoder *)aDecoder
{
    if ((self = [super initWithCoder:aDecoder]))
    {

    }
    return self;
}
-(void)setUpWithData:(NeedRepairParts *)data
{
    self.partsData = data;
    [[self.dataFieldList objectAtIndex:0] setText:data.type];
    [[self.dataFieldList objectAtIndex:1] setText:data.name];
    [[self.dataFieldList objectAtIndex:2] setText:data.cycle];
    [[self.dataFieldList objectAtIndex:3] setText:data.price];
    m_isHandled = data.isHandled;
    [self.handleBtn setSelected:m_isHandled];
}
-(void)handleIt:(id)sender
{
    m_isHandled = YES;
    [self.handleBtn setSelected:YES];
    if (self.partsData != nil)
    {
        self.partsData.isHandled = YES;
    }

}
-(void)dealloc
{
    self.dataFieldList = nil;
    self.handleBtn = nil;
    self.partsData = nil;
    [super dealloc];
}
@end
